package com.example.shoppingmall;

import org.jasypt.util.text.BasicTextEncryptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@SpringBootApplication
public class ShoppingmallApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(ShoppingmallApplication.class, args);
//        BCryptPasswordEncoder encoder=new BCryptPasswordEncoder(10);
//        String encoderpwd=encoder.encode("1234567");
//        System.out.println(encoderpwd);

        BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
        textEncryptor.setPassword("4s56ggdf");
        String pwd=textEncryptor.encrypt("1234567");
        System.out.println(pwd);
    }


    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(ShoppingmallApplication.class);
    }
}